<script type="application/javascript" src={{ url_for('templates',path='jquery-3.5.0.min.js') }} ></script>
<body>
    <h1>算法明细</h1>
	<h1>{{ algorithm.algorithm_code }}
	<h1> 
	<table border=1 width=100%>
	<tr>
	<td>算法编码</td>
	<td>{{algorithm.algorithm_code}}</td>
	<td>算法名称</td>
	<td>{{algorithm.algorithm_name}}</td>
	</tr>
	<tr>
	<td>算法描述</td>
	<td colspan=3>{{algorithm.algorithm_desc}}</td>
	</tr>
	<tr>
	<td>算法文档</td>
	<td><a href="/AIUama/download/{{algorithm.algorithm_code}}/{{algorithm.algorithm_doc}}" >{{algorithm.algorithm_doc}}</a></td>
	<td>训练样本模板文件</td>
	<td><a href="/AIUama/download/{{algorithm.algorithm_code}}/{{algorithm.training_template}}" >{{algorithm.training_template}}</a></td>
	</table>
	
	
	
	<h1>模型列表</h1>
	 <a href="/page/AIUama/model/add/{{algorithm.algorithm_code}}"> 创建模型</a>
    <table border=1 width=100%>
    	<tr>
    	<th>模型编码</th>
    	<th>模型名称</th>
    	<th>模型描述</th>
    	<th>样本文件</th>
    	<th>增量样本文件</th>
    	<th>操作</th>
    	</tr>
    	{% for model in models %}
        	<tr>
        	<td>{{model.model_code}}</td>
        	<td>{{model.model_name}}</td>
        	<td>{{model.model_desc}}</td>
        	<td><a href="/AIUama/download/{{algorithm.algorithm_code}}/{{model.model_code}}/{{model.training_file}}" >{{model.training_file}}</a></td>
        	<td>{{model.incremant_file}}</td>
        	<th> <a href="/page/AIUama/model/call/{{model.algorithm_code}}/{{model.model_code}}" >调用</a>     <a href="#" target="_self" onClick="training('/AIUama/model/training/{{model.algorithm_code}}/{{model.model_code}}')">训练</a></th>
        	</tr>
    	{% endfor %}
    </table>
</body>
<script>
    function training(url){
        alert("开始训练！")
        $.getJSON(url,function(data){
            alert(data.msg)
        })
    }
    
    function call(url){
        alert(url)
        
    }
    
</script>